package com.zdlee.netty.server19.client.console;

import com.zdlee.netty.server19.protocol.request.ListGroupMembersRequestPacket;
import io.netty.channel.Channel;
import lombok.Data;

import java.util.Scanner;

/**
 * @author zdlee
 * @description: ${DESCRIPTION}
 * @create 2018-12-01 15:24
 */
@Data
public class ListGroupMembersConsoleCommand implements ConsoleCommand {
    @Override
    public void exec(Scanner sc, Channel channel) {
        ListGroupMembersRequestPacket listGroupMembersRequestPacket=new ListGroupMembersRequestPacket();

        System.out.print("输入 groupId，获取群成员列表：");
        String groupId=sc.next();

        listGroupMembersRequestPacket.setGroupId(groupId);
        channel.writeAndFlush(listGroupMembersRequestPacket);

    }
}
